package com.hg.miaosha.repository;

import com.hg.miaosha.dao.SuccessKilledDao;
import com.hg.miaosha.entity.SuccessKilled;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

/**
 * created by skh on 2019/6/15
 */
@Repository
public class SuccessKilledRepositoryImpl implements SuccessKilledRepository {

	@Autowired
	private SuccessKilledDao successKilledDao;

	@Override
	public void createSeckilledOrder(SuccessKilled successKilled) {
		successKilledDao.insert(successKilled);
	}

	@Override
	public void deleteAllOrder() {
		successKilledDao.delete(null);
	}

    @Override
    public Integer countSuccessSecKill() {
		return successKilledDao.selectCount(null);
    }
}
